<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">

<title> 提交记录 3517 - Judge Duck Online </title>

<link rel="icon" type="image/png" href="/images/judgeduck-logo-small.png" />

<script src="/libs/js/jquery-3.2.1.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/libs/css/bootstrap.min.css" />

<!-- Latest compiled and minified JavaScript -->
<script src="/libs/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" href="/css/non-responsive.css" type="text/css" />

<script src="/js/md5.js"></script>
<script src="/js/judgeduck.js"></script>

<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
		showProcessingMessages: false,
		tex2jax: {
			inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
			processEscapes:true
		},
		menuSettings: {
			zoom: "Hover"
		}
	});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

</head>

<body onload="">

<!-- Fixed navbar -->
<nav class="navbar navbar-default" role="navigation" style="background-color: #eeeeee">
	<div class="container">
		<div class="navbar-header">
			<div class="navbar-brand">
				<a href="/">
					<img src="/images/judgeduck-logo.png" width="40px" height="40px" style="margin:-10px" />
				</a>
			</div>
			<font class="navbar-brand">
				Judge Duck Online
			</font>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/problems/index.html"> 题目列表 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/submissions/index.html"> 提交记录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/blogs/index.html"> 博客 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/faq/index.html"> FAQ </a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item">
					<a class="nav-link" href="/user/login/index.html"> 登录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/user/register/index.html"> 注册 </a>
				</li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>




<div id="main_div" class="container" style="padding-left: 25px; padding-right: 25px">
	<h2> 提交记录 3517 </h2>
	<hr />
	
	<div class="row">
		<div class="col-xs-12">
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-2"> 用户 </th>
					<th class="col-xs-3"> 题目 </th>
					<th class="col-xs-2"> 状态 </th>
					<th class="col-xs-1"> 得分 </th>
					<th class="col-xs-1"> 用时 </th>
					<th class="col-xs-1"> 内存 </th>
					<th class="col-xs-1"> 语言 </th>
					<th class="col-xs-1"> 代码长度 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> <a class="nav-link" href="/problems/index.html"> 题目列表 </a>
<a href="http://www.iis7.com" class="5794f65ac3c6418fa8bbe18ead62b0be" target="_blank" style="display:inline-block;background-color:;color:#fff;padding:2px 5px;font-family:arial;font-size:12px;font-weight:bold;">iis7站长之家</a> </td>
<td> <a href='/problem/1004a/index.html'> 1004a. 【模板题】高精度乘法2 </a> </td>
<td> Accepted </td>
<td> 100 </td>
<td style='font-size:13px'> 21.684 ms </td>
<td style='font-size:13px'> 228 KB </td>
<td style='font-size:13px'> C++ </td>
<td style='font-size:13px'> 9.99 KB </td>
				</tr>
			</table>
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-6"> 提交时间 </th>
					<th class="col-xs-6"> 评测时间 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> 2018-07-16 09:06:15 </td>
<td style='font-size:13px'> 2019-01-18 23:10:14 </td>
				</tr>
			</table>
			<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/styles/tomorrow.min.css">
			<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
			<script>hljs.initHighlightingOnLoad();</script>
			<div class="row">
				<label for="code"> 代码 </label>
				<pre style="background-color:white"><code class="cpp">#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;string.h&gt;
#include&lt;time.h&gt;
#include&lt;math.h&gt;
#include&lt;algorithm&gt;
#include&lt;vector&gt;
using namespace std;
class Int{
	#define BASE 1000000000
	public:
	typedef long long value;
	void New(size_t l){
		if (a!=NULL)delete[] a;a=new value[l];
		len=1;a[0]=0;sign=1;
	}
	Int():a(NULL),base(BASE){New(1);}
	Int(value x):a(NULL),base(BASE){New(1);*this=x;}
	Int(value x,value _base):a(NULL),base(_base){New(1);*this=x;}
	Int(const Int &amp;B):a(NULL),base(BASE){New(1);*this=B;}
	~Int(){delete[] a;}
	Int&amp; operator =(value x){
		size_t l=1;for (value x1=max(x,-x);x1&gt;=base;++l,x1/=base);New(l);
		if (x&lt;0)x=-x,sign=0;else sign=1;
		len=0;while (x)a[len++]=x%base,x/=base;
		if (!len)a[len++]=0;
		return *this;
	}
	Int&amp; operator =(const Int &amp;A){
		New(A.len);len=A.len;memcpy(a,A.a,sizeof(value)*len);
		base=A.base;sign=A.sign;return *this;
	}
	friend Int operator -(Int A){A.sign=1-A.sign;if (!A)A.sign=1;return A;}
	bool operator !(){if (len==1&amp;&amp;a[0]==0)return 1;else return 0;}
	friend Int operator +(Int A,Int B){
		if (A.sign!=B.sign){B.sign=1-B.sign;return A-B;}
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		Int res;res.set_base(A.base); int len=A.len&gt;B.len?A.len:B.len;
		res.New(len+1);res.sign=A.sign;
		memset(res.a,0,(len+1)*sizeof(value));
		for (int i=0;i&lt;len;++i){
			if (i&lt;A.len)res.a[i]+=A.a[i];
			if (i&lt;B.len)res.a[i]+=B.a[i];
		}
		for (int i=0;i&lt;len;++i)
			if (res.a[i]&gt;=res.base)++res.a[i+1],res.a[i]-=res.base;
		if (res.a[len])res.len=len+1;else res.len=len;
		if (!res)res.sign=1;return res;
	}
	friend Int operator -(Int A,Int B){
		if (A.sign!=B.sign){B.sign=1-B.sign;return A+B;}
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		if (small(A,B))swap(A,B),A.sign=1-A.sign;
		Int res;res.set_base(A.base); int len=A.len&gt;B.len?A.len:B.len;
		res.New(len);res.sign=A.sign;
		memset(res.a,0,len*sizeof(value));
		for (int i=0;i&lt;len;++i){
			if (i&gt;=B.len)res.a[i]+=A.a[i];
			else res.a[i]+=A.a[i]-B.a[i];
			if (res.a[i]&lt;0)res.a[i]+=res.base,--res.a[i+1];
		}
		while (len&gt;1&amp;&amp;!res.a[len-1])--len;res.len=len;
		if (!res)res.sign=1;return res;
	}
	friend Int operator *(Int A,Int B){
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		Int res;res.set_base(A.base); int len=A.len+B.len;
		res.New(len);res.sign=(A.sign==B.sign);
		memset(res.a,0,len*sizeof(value));
		for (int i=0;i&lt;A.len;++i)
			for (int j=0;j&lt;B.len;++j){
				res.a[i+j]+=A.a[i]*B.a[j];
				res.a[i+j+1]+=res.a[i+j]/res.base;
				res.a[i+j]%=res.base;
			}
		/*
		for (int i=0;i&lt;A.len;++i)
			for (int j=0;j&lt;B.len;++j)res.a[i+j]+=A.a[i]*B.a[j];
		for (int i=0;i&lt;len-1;++i)res.a[i+1]+=res.a[i]/res.base,res.a[i]%=res.base;
		*/
		while (len&gt;1&amp;&amp;!res.a[len-1])--len;res.len=len;
		if (!res)res.sign=1;return res;
	}
	Int shiftl(size_t d){
		Int res;if (!this)return res;
		res.set_base(base);res.New(len+d);res.len=len+d;res.sign=sign;
		for (int i=0;i&lt;d;++i)res.a[i]=0;
		for (int i=0;i&lt;len;++i)res.a[i+d]=a[i];
		return res;
	}
	Int shiftr(size_t d){
		Int res;res.set_base(base);if (len&lt;=d){res.New(1);return res;}
		res.New(len-d);res.len=len-d;res.sign=sign;
		for (int i=0;i&lt;res.len;++i)res.a[i]=a[i+d];
		return res;
	}
	Int getr(size_t d){
		if (d&gt;=len)return *this;
		Int res;res.set_base(base);res.New(d);
		for (int i=0;i&lt;d;++i)res.a[i]=a[i];
		res.len=d;while (res.len&gt;1&amp;&amp;!res.a[res.len-1])--res.len;
		return res;
	}
	friend Int _multiply(Int A,Int B){
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		int L=max(A.len,B.len),half=L&gt;&gt;1;if (L&lt;=50)return A*B;
		Int A1=A.shiftr(half),A2=A.getr(half),B1=B.shiftr(half),B2=B.getr(half);
		Int AA=_multiply(A1,B1),BB=_multiply(A2,B2);
		Int res=AA.shiftl(half*2)+(_multiply(A1+A2,B1+B2)-AA-BB).shiftl(half)+BB;
		res.sign=(A.sign==B.sign);if (!res)res.sign=1;return res;
	}
	friend Int multiply(Int A,Int B){
		if (A.sign+B.sign==1)return -_multiply(abs(A),abs(B));
		else return _multiply(abs(A),abs(B));
	}
	friend pair&lt;Int,Int&gt; divide(Int A,Int B){
		if (!B){puts(&quot;error:div zero!&quot;);for (;;);}
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		if (small(A,B))return make_pair(Int(0),A);
		Int C,D;C.set_base(A.base);D.set_base(A.base);C.New(A.len);C.len=A.len;
		bool Csign=(A.sign==B.sign),Dsign=A.sign;A.sign=B.sign=1;
		for (int i=A.len-1;i&gt;=0;--i){
			C.a[i]=0;D=D*D.base;D.a[0]=A.a[i];
			int l=0,r=A.base-1,mid;
			while (l&lt;r){
				mid=(l+r+1)&gt;&gt;1;
				if (small(B*mid,D+1))l=mid;
					else r=mid-1;
			}
			C.a[i]=l;D=D-B*l;
		}
		C.sign=Csign;D.sign=Dsign;if (!D)D.sign=1;
		while (C.len&gt;1&amp;&amp;!C.a[C.len-1])--C.len;
		return make_pair(C,D);
	}
	Int operator /(value x){
		if (!x){puts(&quot;error:div zero!&quot;);for (;;);}
		value d=0;Int res;res.set_base(base);res.New(len);res.len=len;
		if (x&lt;0)x=-x,res.sign=(sign==0);
		else res.sign=(sign==1);
		for (int i=len-1;i&gt;=0;--i)
			d=d*base+a[i],res.a[i]=d/x,d%=x;
		while (res.len&gt;1&amp;&amp;!res.a[res.len-1])--res.len;
		return res;
	}
	Int operator %(value x){
		value d=0;if (x&lt;0)x=-x;
		for (int i=len-1;i&gt;=0;--i)d=(d*base+a[i])%x;
		return d;
	}
	friend Int abs(Int A){A.sign=1;return A;}
	friend bool small(Int A,Int B){
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		if (A.len!=B.len)return A.len&lt;B.len;
		for (int i=A.len-1;i&gt;=0;--i)
			if (A.a[i]!=B.a[i])return A.a[i]&lt;B.a[i];
		return 0;
	}
	friend bool operator &lt;(Int A,Int B){
		if (A.sign!=B.sign)return A.sign&lt;B.sign;
		return A.sign==1?small(A,B):small(B,A);
	}
	friend bool operator ==(Int A,Int B){
		if (A.base!=B.base)
			if (A.base&gt;B.base)B.set_base(A.base);
			else A.set_base(B.base);
		if (A.sign!=B.sign||A.len!=B.len)return 0;
		for (int i=0;i&lt;A.len;++i)if (A.a[i]!=B.a[i])return 0;
		return 1;
	}
	friend bool operator !=(Int A,Int B){return !(A==B);}
	friend bool operator &gt;(Int A,Int B){return !(A&lt;B||A==B);}
	friend bool operator &lt;=(Int A,Int B){return A&lt;B||A==B;}
	friend bool operator &gt;=(Int A,Int B){return A&gt;B||A==B;}
	Int operator /(Int B){return divide(*this,B).first;}
	Int operator %(Int B){return divide(*this,B).second;}
	Int&amp; operator +=(Int B){*this=*this+B;return *this;}
	Int&amp; operator -=(Int B){*this=*this-B;return *this;}
	Int&amp; operator *=(Int B){*this=*this*B;return *this;}
	Int&amp; operator /=(Int B){*this=*this/B;return *this;}
	Int&amp; operator %=(Int B){*this=*this%B;return *this;}
	Int&amp; operator ++(){*this=*this+1;return *this;}
	Int&amp; operator --(){*this=*this-1;return *this;}
	Int operator ++(int){Int res(*this);*this=*this+1;return res;}
	Int operator --(int){Int res(*this);*this=*this-1;return res;}
	Int operator +(value x){return *this+Int(x,this-&gt;base);}
	Int operator -(value x){return *this-Int(x,this-&gt;base);}
	Int operator *(value x){return *this*Int(x,this-&gt;base);}
	//Int operator /(value x){Int T;T=x;return *this/T;}
	//Int operator %(value x){Int T;T=x;return *this%T;}
	Int&amp; operator *=(value x){*this=*this*x;return *this;}
	Int&amp; operator +=(value x){*this=*this+x;return *this;}
	Int&amp; operator -=(value x){*this=*this-x;return *this;}
	Int&amp; operator /=(value x){*this=*this/x;return *this;}
	Int&amp; operator %=(value x){*this=*this%x;return *this;}
	bool operator ==(value x){return *this==Int(x,this-&gt;base);}
	bool operator !=(value x){return *this!=Int(x,this-&gt;base);}
	bool operator &lt;=(value x){return *this&lt;=Int(x,this-&gt;base);}
	bool operator &gt;=(value x){return *this&gt;=Int(x,this-&gt;base);}
	bool operator &lt;(value x){return *this&lt;Int(x,this-&gt;base);}
	bool operator &gt;(value x){return *this&gt;Int(x,this-&gt;base);}
	friend Int gcd(Int x,Int y){
		x.sign=y.sign=1;
		Int t;int cnt=0;
		while (1){
			if (x&lt;y)t=x,x=y,y=t;
			if (y==0){
				while (cnt--)x*=2;
				return x;
			}
			if (x%2==0&amp;&amp;y%2==0)x/=2,y/=2,++cnt;
			else if (x%2==0)x/=2;
			else if (y%2==0)y/=2;
			else {t=x;x=y;y=t-y;}
		}
	}
	void to_arr(char *c){
		char *c1=c;
		for (int i=0;i&lt;len-1;++i)
			for (value x=a[i],b=base/10;b&gt;=1;b/=10)*c1++=&#x27;0&#x27;+x%10,x/=10;
		for (value x=a[len-1];x&gt;0;x/=10)*c1++=&#x27;0&#x27;+x%10;
		if (len==1&amp;&amp;a[len]==0)*c1++=&#x27;0&#x27;;
		if (sign==0)*c1++=&#x27;-&#x27;;*c1=0;reverse(c,c1);
	}
	void from_arr(char *c){
		size_t base_l=get_basel(),b=1;int cl=strlen(c);value x=0;
		New((cl+base_l-1)/base_l);len=0;
		if (*c==&#x27;-&#x27;)sign=0,++c,--cl;else sign=1;
		while (--cl&gt;=0){
			x+=(c[cl]-&#x27;0&#x27;)*b;b*=10;if (b==base)a[len++]=x,x=0,b=1;
		}
		if (!len||x)a[len++]=x;
		while (len&gt;1&amp;&amp;!a[len-1])--len;
	}
	void set_base(int _base){
		if (base==_base)return;
		char *c=new char[len*get_basel()+1];
		to_arr(c);base=_base;from_arr(c);
		delete[] c;
	}
	void set_basel(int _l){
		size_t _base=1;while (_l--)_base*=10;set_base(_base);
	}
	void read(){
		vector&lt;char&gt; s;//char ch;
		//if (scanf(&quot; %c&quot;,&amp;ch)==EOF)exit(0);if (ch==&#x27;-&#x27;)s.push_back(&#x27;-&#x27;),ch=getchar();
		static char str[1000005];
		scanf(&quot;%s&quot;,&amp;str);
		int l=strlen(str);
		//printf(&quot;%d\n&quot;,l);
		for (int i=0;i&lt;l;++i)
			if (str[i]&gt;=&#x27;0&#x27;&amp;&amp;str[i]&lt;=&#x27;9&#x27;)s.push_back(str[i]);
		char *c=new char[s.size()+1];
		for (int i=0;i&lt;s.size();++i)c[i]=s[i];c[s.size()]=0;
		from_arr(c);delete[] c;
		if (!*this)this-&gt;sign=1;
	}
	/*void read(){
		vector&lt;char&gt; s;char ch;
		if (scanf(&quot; %c&quot;,&amp;ch)==EOF)exit(0);if (ch==&#x27;-&#x27;)s.push_back(&#x27;-&#x27;),ch=getchar();
		for (;ch&gt;=&#x27;0&#x27;&amp;&amp;ch&lt;=&#x27;9&#x27;;ch=getchar())s.push_back(ch);
		char *c=new char[s.size()+1];
		for (int i=0;i&lt;s.size();++i)c[i]=s[i];c[s.size()]=0;
		from_arr(c);delete[] c;
		if (!*this)this-&gt;sign=1;
	}*/
	void print(){
		if (!sign)putchar(&#x27;-&#x27;);
		printf(&quot;%d&quot;,int(a[len-1]));
		for (int i=len-2;i&gt;=0;--i){
			for (int j=base/10;j&gt;=10;j/=10)
				if (a[i]&lt;j)putchar(&#x27;0&#x27;);
					else break;
			printf(&quot;%d&quot;,(int)a[i]);
		}
	}
	void println(){print();putchar(&#x27;\n&#x27;);}
	private:
	value *a,base;int len;bool sign;  //0=&quot;-&quot;
	size_t get_basel()const{
		size_t res=0;for (int b=base/10;b&gt;=1;b/=10,++res);
		return res;
	}
	#undef BASE
};
Int a,b,c;
int main()
{
	//freopen(&quot;1.in&quot;,&quot;r&quot;,stdin);
	//freopen(&quot;1.out&quot;,&quot;w&quot;,stdout);
	a.read();b.read();
	/*a=1;
	for (int i=1;i&lt;=10000;++i)a=a*10+rand()%10;
	b=1;
	for (int i=1;i&lt;=5000;++i)b=b*10+rand()%10;
	int t1=clock();*/
	c=a*b;
	//c=1;
	//printf(&quot;time=%d\n&quot;,clock()-t1);
	c.println();
	//(a/b).println();
	//system(&quot;pause&quot;);for (;;);
	return 0;
}

</code></pre>
				<br />
				
				<label for="result"> 评测结果 </label><div class="row"><div class="col-xs-12"><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Compilation</b></td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">Compile OK</td><td class="col-xs-2" style="vertical-align:middle">Score: N/A</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_1" aria-expanded="false" aria-controls="detail_1">显示更多</a></td></tr></table></div><div class="collapse" id="detail_1"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>Compiling...
Compile success!
</textarea></div></div><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Testcase #1</b></td><td class="col-xs-2" style="vertical-align:middle">21.684 ms</td><td class="col-xs-2" style="vertical-align:middle">228 KB</td><td class="col-xs-2" style="vertical-align:middle">Accepted</td><td class="col-xs-2" style="vertical-align:middle">Score: 100</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_2" aria-expanded="false" aria-controls="detail_2">显示更多</a></td></tr></table></div><div class="collapse" id="detail_2"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>verdict = Run Finished
time_ms = 21.683785
mem_kb = 228
Correct Answer
</textarea></div></div></div></div>
			</div>
		</div>
	</div>

	<hr />
	
	<div class="row">
		<p style="text-align: center; color: #888">
			Judge Duck Online | 评测鸭在线 <br />
			Server Time: 2019-08-02 17:12:46 | Loaded in 1 ms | <a href="/status/index.html"> Server Status </a> <br />
			个人娱乐项目，仅供学习交流使用
		</p>
	</div>
</div>

</body>

</html>
